
game:setAmbient(0.5,0.5,0.5)
game:setGravity(0.0,-9.81,0.0)

Map = {
	numberOfPoints = 5,
	point1={x=0,y=0,z=0},
	point2={x=50,y=50,z=0},
	point3={x=30,y=50,z=-100},
	point4={x=0,y=0,z=-200},
	point5={x=50,y=100,z=-300}
}

-- BodyRailControlLogic
game:createBodyRailControlLogic("BodyRailControlLogic", {mapBasePoints = Map, resolution = 0.01} )

game:createActorDesc({name="Sword"},function(_)
	game:BoxShape(_,{position={x=0.0,y=0.0,z=0.0},rotation={x=0.0,y=0.0,z=0.0},dimension={x=2.5,y=1.0,z=12.0}})
	game:BoxShape(_,{position={x=0.0,y=0.0,z=5.5},rotation={x=0.0,y=0.0,z=0.0},dimension={x=5.0,y=1.5,z=2.0}})
end)
	
game:createNode({x=0.0, y=0.0, z=-100.0},{x=0.0, y=0.0, z=0.0},{x=1.0, y=1.0, z=1.0},function(node,controlnode)
	game:PhysicsEntity("body",node,controlnode,{mesh="Derins_Sword.mesh", controlLogic="BodyRailControlLogic",collisionGroup=1, weight=300.0,boundingBox=0.1, isStatic=false, isKinematic=true, actorDesc="SimpleBox"},function(_)
	end)
	game:createCamera(node,{name="mainCam"})
	game:addNode(node,controlnode,{x=0.0, y=0.0, z=0.0},{x=0.0, y=0.0, z=0.0},{x=4.0, y=4.0, z=4.0},function(node,controlnode)
		game:PhysicsEntity("kard",node,controlnode,{mesh="Derins_Sword.mesh", controlLogic="PlayerControlLogic",collisionGroup=1, weight=300.0, boundingBox=3.95, isStatic=false, isKinematic=true, actorDesc="Sword"},function(_)
		end)
	end)
end)

